﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BookStore.Data;
using BookStore.Bussiness;

namespace BookStore
{
    public partial class Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void imgbtnsent_Click(object sender, ImageClickEventArgs e)
        {
            Contactinfo objcontact = new Contactinfo();
            
            objcontact.Name = txtname.Text;
            objcontact.Email = txtemail.Text;
            objcontact.Content = txtcontent.Text;

            bool s = Contactservices.InsertContact(objcontact);
            if (s== true)
            {
                Label1.Text = "Thank you send contact us!";
                txtname.Text = string.Empty;
                txtemail.Text = string.Empty;
                txtcontent.Text = string.Empty;
            }
        }
    }
}
